package com.fish.gaiety.gateway.controller;

import com.fish.gaiety.gateway.entity.dto.User;
import com.fish.gaiety.gateway.service.UserServiceDeprecated;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Jerry
 * @date 2022/9/21
 * @description Open Api
 */
@RestController
@RequestMapping("/open")
@RequiredArgsConstructor
public class OpenController {

    final UserServiceDeprecated userServiceDeprecated;


    @GetMapping("/user")
    public List<User> getAllUser(){
        return userServiceDeprecated.findAllUsers();
    }
}
